﻿//        Another Demo from Andy L. & MissedMemo.com
// Borrow whatever code seems useful - just don't try to hold
// me responsible for any ill effects. My demos sometimes use
// licensed images which CANNOT legally be copied and reused.

using System;
using System.ServiceModel;


namespace MissedMemo.MeatAndCheeseDisc.Services
{
     // Service methods, called by client...

    [ServiceContract( Namespace = "http://www.MissedMemo.com/MeatAndCheeseDisc/2008/05", CallbackContract = typeof( IOrderMonitorNotification ) )]
    public interface IKitchenOrderMonitorService
    {
        [OperationContract( IsOneWay = true )]
        void SubscribeOrderMonitorNotifications();

        [OperationContract( IsOneWay = true )]
        void UnsubscribeOrderMonitorNotifications();

        [OperationContract( IsOneWay = true )]
        void NotifyPizzaIsDone( int nowServingNumber, Pizza pizza );
    }


    // Client callback methods (called on client BY SERVICE)

    public interface IOrderMonitorNotification
    {
        [OperationContract( IsOneWay = true )]
        void OnNewPizza( int nowServingNumber, Pizza pizza );

        [OperationContract( IsOneWay = true )]
        void OnCancelOrder( int orderID );
    }
}
